package ai.people.core.grpc.lib.es;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.42.0)",
    comments = "Source: es/account-search.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class SearchAccountServiceGrpc {

  private SearchAccountServiceGrpc() {}

  public static final String SERVICE_NAME = "es.SearchAccountService";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor<ai.people.core.grpc.lib.es.SearchAccountGrpcRequest,
      ai.people.core.grpc.lib.es.SearchAccountPageResponse> getSearchAccountMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "searchAccount",
      requestType = ai.people.core.grpc.lib.es.SearchAccountGrpcRequest.class,
      responseType = ai.people.core.grpc.lib.es.SearchAccountPageResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<ai.people.core.grpc.lib.es.SearchAccountGrpcRequest,
      ai.people.core.grpc.lib.es.SearchAccountPageResponse> getSearchAccountMethod() {
    io.grpc.MethodDescriptor<ai.people.core.grpc.lib.es.SearchAccountGrpcRequest, ai.people.core.grpc.lib.es.SearchAccountPageResponse> getSearchAccountMethod;
    if ((getSearchAccountMethod = SearchAccountServiceGrpc.getSearchAccountMethod) == null) {
      synchronized (SearchAccountServiceGrpc.class) {
        if ((getSearchAccountMethod = SearchAccountServiceGrpc.getSearchAccountMethod) == null) {
          SearchAccountServiceGrpc.getSearchAccountMethod = getSearchAccountMethod =
              io.grpc.MethodDescriptor.<ai.people.core.grpc.lib.es.SearchAccountGrpcRequest, ai.people.core.grpc.lib.es.SearchAccountPageResponse>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "searchAccount"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  ai.people.core.grpc.lib.es.SearchAccountGrpcRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  ai.people.core.grpc.lib.es.SearchAccountPageResponse.getDefaultInstance()))
              .setSchemaDescriptor(new SearchAccountServiceMethodDescriptorSupplier("searchAccount"))
              .build();
        }
      }
    }
    return getSearchAccountMethod;
  }

  private static volatile io.grpc.MethodDescriptor<ai.people.core.grpc.lib.es.SearchAccountGrpcRequest,
      ai.people.core.grpc.lib.es.SearchAccountPageResponse> getSearchLabelAccountMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "searchLabelAccount",
      requestType = ai.people.core.grpc.lib.es.SearchAccountGrpcRequest.class,
      responseType = ai.people.core.grpc.lib.es.SearchAccountPageResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<ai.people.core.grpc.lib.es.SearchAccountGrpcRequest,
      ai.people.core.grpc.lib.es.SearchAccountPageResponse> getSearchLabelAccountMethod() {
    io.grpc.MethodDescriptor<ai.people.core.grpc.lib.es.SearchAccountGrpcRequest, ai.people.core.grpc.lib.es.SearchAccountPageResponse> getSearchLabelAccountMethod;
    if ((getSearchLabelAccountMethod = SearchAccountServiceGrpc.getSearchLabelAccountMethod) == null) {
      synchronized (SearchAccountServiceGrpc.class) {
        if ((getSearchLabelAccountMethod = SearchAccountServiceGrpc.getSearchLabelAccountMethod) == null) {
          SearchAccountServiceGrpc.getSearchLabelAccountMethod = getSearchLabelAccountMethod =
              io.grpc.MethodDescriptor.<ai.people.core.grpc.lib.es.SearchAccountGrpcRequest, ai.people.core.grpc.lib.es.SearchAccountPageResponse>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "searchLabelAccount"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  ai.people.core.grpc.lib.es.SearchAccountGrpcRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  ai.people.core.grpc.lib.es.SearchAccountPageResponse.getDefaultInstance()))
              .setSchemaDescriptor(new SearchAccountServiceMethodDescriptorSupplier("searchLabelAccount"))
              .build();
        }
      }
    }
    return getSearchLabelAccountMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static SearchAccountServiceStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<SearchAccountServiceStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<SearchAccountServiceStub>() {
        @java.lang.Override
        public SearchAccountServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new SearchAccountServiceStub(channel, callOptions);
        }
      };
    return SearchAccountServiceStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static SearchAccountServiceBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<SearchAccountServiceBlockingStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<SearchAccountServiceBlockingStub>() {
        @java.lang.Override
        public SearchAccountServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new SearchAccountServiceBlockingStub(channel, callOptions);
        }
      };
    return SearchAccountServiceBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static SearchAccountServiceFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<SearchAccountServiceFutureStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<SearchAccountServiceFutureStub>() {
        @java.lang.Override
        public SearchAccountServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new SearchAccountServiceFutureStub(channel, callOptions);
        }
      };
    return SearchAccountServiceFutureStub.newStub(factory, channel);
  }

  /**
   */
  public static abstract class SearchAccountServiceImplBase implements io.grpc.BindableService {

    /**
     */
    public void searchAccount(ai.people.core.grpc.lib.es.SearchAccountGrpcRequest request,
        io.grpc.stub.StreamObserver<ai.people.core.grpc.lib.es.SearchAccountPageResponse> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSearchAccountMethod(), responseObserver);
    }

    /**
     * <pre>
     * 查询预警账号、被打了标签的账号
     * </pre>
     */
    public void searchLabelAccount(ai.people.core.grpc.lib.es.SearchAccountGrpcRequest request,
        io.grpc.stub.StreamObserver<ai.people.core.grpc.lib.es.SearchAccountPageResponse> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSearchLabelAccountMethod(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getSearchAccountMethod(),
            io.grpc.stub.ServerCalls.asyncUnaryCall(
              new MethodHandlers<
                ai.people.core.grpc.lib.es.SearchAccountGrpcRequest,
                ai.people.core.grpc.lib.es.SearchAccountPageResponse>(
                  this, METHODID_SEARCH_ACCOUNT)))
          .addMethod(
            getSearchLabelAccountMethod(),
            io.grpc.stub.ServerCalls.asyncUnaryCall(
              new MethodHandlers<
                ai.people.core.grpc.lib.es.SearchAccountGrpcRequest,
                ai.people.core.grpc.lib.es.SearchAccountPageResponse>(
                  this, METHODID_SEARCH_LABEL_ACCOUNT)))
          .build();
    }
  }

  /**
   */
  public static final class SearchAccountServiceStub extends io.grpc.stub.AbstractAsyncStub<SearchAccountServiceStub> {
    private SearchAccountServiceStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected SearchAccountServiceStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new SearchAccountServiceStub(channel, callOptions);
    }

    /**
     */
    public void searchAccount(ai.people.core.grpc.lib.es.SearchAccountGrpcRequest request,
        io.grpc.stub.StreamObserver<ai.people.core.grpc.lib.es.SearchAccountPageResponse> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getSearchAccountMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     * 查询预警账号、被打了标签的账号
     * </pre>
     */
    public void searchLabelAccount(ai.people.core.grpc.lib.es.SearchAccountGrpcRequest request,
        io.grpc.stub.StreamObserver<ai.people.core.grpc.lib.es.SearchAccountPageResponse> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getSearchLabelAccountMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   */
  public static final class SearchAccountServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<SearchAccountServiceBlockingStub> {
    private SearchAccountServiceBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected SearchAccountServiceBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new SearchAccountServiceBlockingStub(channel, callOptions);
    }

    /**
     */
    public ai.people.core.grpc.lib.es.SearchAccountPageResponse searchAccount(ai.people.core.grpc.lib.es.SearchAccountGrpcRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getSearchAccountMethod(), getCallOptions(), request);
    }

    /**
     * <pre>
     * 查询预警账号、被打了标签的账号
     * </pre>
     */
    public ai.people.core.grpc.lib.es.SearchAccountPageResponse searchLabelAccount(ai.people.core.grpc.lib.es.SearchAccountGrpcRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getSearchLabelAccountMethod(), getCallOptions(), request);
    }
  }

  /**
   */
  public static final class SearchAccountServiceFutureStub extends io.grpc.stub.AbstractFutureStub<SearchAccountServiceFutureStub> {
    private SearchAccountServiceFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected SearchAccountServiceFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new SearchAccountServiceFutureStub(channel, callOptions);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture<ai.people.core.grpc.lib.es.SearchAccountPageResponse> searchAccount(
        ai.people.core.grpc.lib.es.SearchAccountGrpcRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getSearchAccountMethod(), getCallOptions()), request);
    }

    /**
     * <pre>
     * 查询预警账号、被打了标签的账号
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<ai.people.core.grpc.lib.es.SearchAccountPageResponse> searchLabelAccount(
        ai.people.core.grpc.lib.es.SearchAccountGrpcRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getSearchLabelAccountMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_SEARCH_ACCOUNT = 0;
  private static final int METHODID_SEARCH_LABEL_ACCOUNT = 1;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final SearchAccountServiceImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(SearchAccountServiceImplBase serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_SEARCH_ACCOUNT:
          serviceImpl.searchAccount((ai.people.core.grpc.lib.es.SearchAccountGrpcRequest) request,
              (io.grpc.stub.StreamObserver<ai.people.core.grpc.lib.es.SearchAccountPageResponse>) responseObserver);
          break;
        case METHODID_SEARCH_LABEL_ACCOUNT:
          serviceImpl.searchLabelAccount((ai.people.core.grpc.lib.es.SearchAccountGrpcRequest) request,
              (io.grpc.stub.StreamObserver<ai.people.core.grpc.lib.es.SearchAccountPageResponse>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class SearchAccountServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    SearchAccountServiceBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return ai.people.core.grpc.lib.es.AccountSearch.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("SearchAccountService");
    }
  }

  private static final class SearchAccountServiceFileDescriptorSupplier
      extends SearchAccountServiceBaseDescriptorSupplier {
    SearchAccountServiceFileDescriptorSupplier() {}
  }

  private static final class SearchAccountServiceMethodDescriptorSupplier
      extends SearchAccountServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    SearchAccountServiceMethodDescriptorSupplier(String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (SearchAccountServiceGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new SearchAccountServiceFileDescriptorSupplier())
              .addMethod(getSearchAccountMethod())
              .addMethod(getSearchLabelAccountMethod())
              .build();
        }
      }
    }
    return result;
  }
}
